﻿; Note that WHERE clauses must have -- between the variable/operator and the
; comparison value.  The reason is because since it's the comment symbol for
; SQL it won't interfere with your clause but it does provide a clue for Avian
; Play about where to parameterize the comparison value.  Non-parameterized
; WHERE variables are not allowed due to the possibility of malformed SQL due
; to the way value variables might evaluate (for example, if an Artist/Song
; name contains non-escaped SQL characters).

[Main]
Mode = Menus
SubMenu1 = MusicByArtist
SubMenu2 = MusicByAlbumArtist
SubMenu3 = MusicByAlbum
SubMenu4 = MusicByTitle
SubMenu5 = MusicByGenre
SubMenu6 = PodcastByAuthor
SubMenu7 = PodcastByTitle
SubMenu8 = Last25PlayedMedia
SubMenu9 = Newest25Media
SubMenu10 = FavoriteMedia
SubMenu11 = AllMedia
SubMenu12 = FavoritePlaylists
SubMenu13 = AllPlaylists
SubMenu14 = Shoutcast
SubMenu15 = MemorizedSongs

[MusicByArtist]
Mode = SubMenuQuery
SubMenuQuerySelect = DISTINCT [Artist] FROM [FileLibrary] 
SubMenuQueryWhere1 = [IsPodcast] = -- 0
SubMenuQueryOrder1 = [Artist] ASC
SubMenuQueryGo = MusicByAlbumWithArtist
SubMenuTextColumn = Artist
SubMenuTextEmpty = NoArtist

[MusicByAlbumArtist]
Mode = SubMenuQuery
SubMenuQuerySelect = DISTINCT [AlbumArtist] FROM [FileLibrary] 
SubMenuQueryWhere1 = [IsPodcast] = -- 0
SubMenuQueryOrder1 = [AlbumArtist] ASC
SubMenuQueryGo = MusicByAlbumWithArtist
SubMenuTextColumn = AlbumArtist
SubMenuTextEmpty = NoArtist

[MusicByAlbum]
Mode = SubMenuQuery
SubMenuQuerySelect = DISTINCT [Album], [AlbumArtist] FROM [FileLibrary]
SubMenuQueryWhere1 = [IsPodcast] = -- 0
SubMenuQueryOrder1 = [Album] ASC
SubMenuThumbWhere1 = [Album] = -- {Album}
SubMenuThumbWhere2 = [HasAlbumArt] = -- 1
SubMenuQueryGo = MusicByTitleAlbum
SubMenuTextColumn = Album
SubMenuTextEmpty = NoAlbum

[MusicByAlbumWithArtist]
Mode = SubMenuQuery
SubMenuSkipItem = MusicByTitle | AllSongsBy | {Artist}{AlbumArtist}
SubMenuQuerySelect = DISTINCT [Album], [AlbumArtist] FROM [FileLibrary]
SubMenuQueryWhere1 = [Artist] = -- {Artist}
SubMenuQueryWhere2 = [AlbumArtist] = -- {AlbumArtist}
SubMenuQueryWhere3 = [IsPodcast] = -- 0
SubMenuQueryOrder1 = [Album] ASC
SubMenuThumbWhere1 = [Artist] = -- {Artist}
SubMenuThumbWhere2 = [AlbumArtist] =  -- {AlbumArtist}
SubMenuThumbWhere3 = [Album] = -- {Album}
SubMenuThumbWhere4 = [HasAlbumArt] = -- 1
SubMenuQueryGo = MusicByTitleAlbum
SubMenuTextColumn = Album
SubMenuTextEmpty = NoAlbum

[MusicByGenre]
Mode = SubMenuQuery
SubMenuQuerySelect = DISTINCT [Genre] FROM [FileLibrary]
SubMenuQueryWhere1 = [IsPodcast] = -- 0
SubMenuQueryOrder1 = [Genre] ASC
SubMenuQueryGo = MusicByTitle
SubMenuTextColumn = Genre
SubMenuTextEmpty = NoGenre

[MusicByTitleAlbum]
Mode = ItemQuery
ItemQueryTable = [FileLibrary]
ItemQueryWhere1 = [Artist] = -- {Artist}
ItemQueryWhere2 = [AlbumArtist] = -- {AlbumArtist}
ItemQueryWhere3 = [Album] = -- {Album}
ItemQueryWhere4 = [IsPodcast] = -- 0
ItemQueryOrder1 = [TrackNumber] ASC, [Title] ASC

[MusicByTitle]
Mode = ItemQuery
ItemQueryTable = [FileLibrary]
ItemQueryWhere1 = [Artist] = -- {Artist}
ItemQueryWhere2 = [AlbumArtist] = -- {AlbumArtist}
ItemQueryWhere3 = [Genre] = -- {Genre}
ItemQueryWhere4 = [IsPodcast] = -- 0
ItemQueryOrder1 = [Title] ASC

[PodcastByAuthor]
Mode = SubMenuQuery
SubMenuQuerySelect = DISTINCT [Artist] FROM [FileLibrary] 
SubMenuQueryWhere1 = [IsPodcast] = -- 1
SubMenuQueryOrder1 = [Artist] ASC
SubMenuQueryGo = PodcastByTitle
SubMenuTextColumn = Artist
SubMenuTextEmpty = NoPodcastAuthor

[PodcastByTitle]
Mode = ItemQuery
ItemQueryTable = [FileLibrary]
ItemQueryWhere1 = [Artist] = -- {Artist}
ItemQueryWhere2 = [IsPodcast] = -- 1
ItemQueryOrder1 = [Title] ASC

[AllMedia]
Mode = ItemQuery
ItemQueryTable = [FileLibrary]
ItemQueryOrder1 = [Title] ASC

[FavoriteMedia]
Mode = ItemQuery
ItemQueryTable = [FileLibrary]
ItemQueryWhere1 = [IsFavorite] = -- 1
ItemQueryOrder1 = [Title] ASC

[Shoutcast]
Mode = Plugin
Plugin = Shoutcast.dll

[FavoritePlaylists]
Mode = ItemQuery
ItemQueryTable = [PlaylistLibrary]
ItemQueryWhere1 = [IsFavorite] = -- 1
ItemQueryOrder1 = [Title] ASC

[AllPlaylists]
Mode = ItemQuery
ItemQueryTable = [PlaylistLibrary]
ItemQueryOrder1 = [Title] ASC

[Last25PlayedMedia]
Mode = ItemQuery
ItemQueryTable = [FileLibrary]
ItemQueryWhere1 = DATEPART(yyyy,LastPlayedDate) > -- 1900
ItemQueryOrder1 = [LastPlayedDate] DESC
ItemQueryLimit = 25

[Newest25Media]
Mode = ItemQuery
ItemQueryTable = [FileLibrary]
ItemQueryOrder1 = [AddedDate] DESC
ItemQueryLimit = 25

[MemorizedSongs]
Mode = Plugin
Plugin = MemorizedSongs.dll

; Note: The below was developed, but not used. Use it if you want!
[LoadItemsFromPlaylist]
Mode = ItemPlaylist
ItemPlaylist = <INSTALL>\Playlist.avpl




; DO NOT MODIFY THE BELOW SECTION -------------------------
[Meta]
Version = 1
; DO NOT MODIFY THE ABOVE SECTION -------------------------
